package com.fable.common.configura.shiro;

import com.fable.common.utils.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ShiroController {

    @RequestMapping("/notLogin")
    public  String unAuthenticatedPage(){
        return "403";
    }


    @RequestMapping("/api/notLogin")
    public @ResponseBody R unAuthenticatedApi(){
        return R.error("未登录");
    }

    @RequestMapping("/unauthorized")
    public @ResponseBody R unauthorized(){
        return R.error("为授权");
    }
}


